package xyj.sparrow.discovery.zk.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author 江南小俊
 * @since 2021/6/18
 **/
@Configuration
@EnableConfigurationProperties(ZkConf.class)
//@ConditionalOnProperty(prefix = "xyj.sparrow.discovery", name = "type", havingValue = "zookeeper")
@ConditionalOnExpression("'${xyj.sparrow.mode}'.equals('cluster')&&'${xyj.sparrow.discovery.type}'.equals('zookeeper')")
@ComponentScan(basePackages = "xyj.sparrow.discovery.zk.bean")
public class AutoConfiguration {
}
